import request from '@/config/request'
import type { OrderSearchForm } from '@/config/forms'

export default {
    searchList: (form : OrderSearchForm) => request.post('/backend/orders', form),
    getItem: (id : number) => request.get(`/backend/orders/${id}`),
    changePrice: (id: number, price: number) => request.post(`/backend/orders/${id}/price`, { price }),
    complete: (id: number) => request.post(`/backend/orders/${id}/complete`),
    cancel: (id: number) => request.post(`/backend/orders/${id}/cancel`),
    operators: (id: number) => request.get(`/backend/orders/${id}/operates`)
}